package com.ihg.hiex.admin.web.controller.session.during;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.demo2do.core.web.interceptor.MenuSetting;
import com.ihg.hiex.admin.entity.security.Login;
import com.ihg.hiex.admin.web.resolver.Secure;



/**
 * 
 * @author houtao
 *
 */
@Controller
@RequestMapping("/sessions/{sessionId}/webex-discussion")
@MenuSetting("menu-sessions")
public class WebexDiscussionController {
    
	/**
	 * 
	 * @param login
	 * @param sessionId
	 * @return
	 */
	@MenuSetting("submenu-session-during-day-two")
    @RequestMapping(path = "", method = RequestMethod.GET)
    public ModelAndView view(@Secure Login login,
    						 @PathVariable("sessionId") Long sessionId) {
    	
        ModelAndView modelAndView = new ModelAndView("session/during/webex-discussion/webex-discussion-admin-view");
        
        modelAndView.addObject("type", "webex-discussion");
        modelAndView.addObject("id", sessionId);
        modelAndView.addObject("menuType", login.isAdministrator() ? "sessions" : "preparation");
        
        return modelAndView;
    }
    
}
